<!--{include(pe_tpl('header_dialog.html'));}-->
<ul id="treeDemo" class="ztree"></ul>
<link type="text/css" rel="stylesheet" href="{$pe['host']}include/plugin/ztree/css/zTreeStyle/zTreeStyle.css" />
<script type="text/javascript" src="{$pe['host']}include/plugin/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript">
/*var setting = {
	data: {
		simpleData: {
			enable: true
		}
	}
};
var zNodes = {$json};*/
var setting = {
	view: {
		selectedMulti: false
	},
	async: {
		enable: true,
		type: 'get',
		url: "admin.php?mod=user&act=tglist_json",
		otherParam:{"id":"{$user_id}"},
		autoParam: ["id=pid", "level"]
	}
};
$(function(){
	$.fn.zTree.init($("#treeDemo"), setting);	
})
function tree_btn(type){
	var zTree = $.fn.zTree.getZTreeObj("treeDemo");
	if (type == 'open') {
		zTree.expandAll(true);	
	}
	else {
		zTree.expandAll(false);	
	}
}
</script>
<!--{include(pe_tpl('footer_dialog.html'));}-->